package com.youshang520i.consuldiscoveryprovider.controller;

import com.alibaba.fastjson.JSONObject;
import com.youshang520i.consuldiscoveryprovider.model.Goods;
import com.youshang520i.consuldiscoveryprovider.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author youshang
 */
@RestController
public class GoodsController {

    @Autowired
    private GoodsService goodsService;


    @GetMapping("/goodsList")
    public List<Goods> goodsList(){
        List<Goods> goods = goodsService.selectGoodsList();
        return goods;
    }
}
